From 48114954f9e539dbdfb1e16b224b4282b27e46db Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 26 May 2010 08:09:38 +0100 Subject: [PATCH] compat-guest accessor macros do not need address check for hvm guests. Signed-off-by: Tim Deegan --- xen/include/xen/compat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h index e662045841..0b8c2c9416 100644 --- a/xen/include/xen/compat.h +++ b/xen/include/xen/compat.h @@ -90,8 +90,9 @@ * Allows use of faster __copy_* functions. */ #define compat_handle_okay(hnd, nr) \ + (paging_mode_external(current->domain) || \ compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ - sizeof(**(hnd)._)) + sizeof(**(hnd)._))) #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ const typeof(*(ptr)) *_s = (ptr); \ -- 2.30.2